#include <iostream>
#include "SmtpClient.h"
#include "Mail.h"


using namespace std;


int main( int argc, char * argv )
{
	SmtpClient	smtpClient( "localhost", 25 );
	Mail		mail;

	mail.setMailFrom("cestmichel@free.fr");
	mail.setMailTo("copain@free.fr");
	mail.setBody("Comment ca va tronche de suchi ?");

	if( true == smtpClient.isInit() )
	{
		if( 0 >= smtpClient.sendMail(mail) )
		{
			cerr << "Error while sendint the mail!" << endl;
			return -1;
		}
	}
	else
	{
		cerr << "Error while connecting to the smtp server!" << endl;
		return -1;
	}

	return 0;
}
